{extend name="admin@public/basic" /}
{block name="style"}{/block}
<link rel="stylesheet" href="__STATIC__/css/admin/public.css" media="all"/>
{block name="cotent"}
<div class="layui-card">
    <div class="layui-card-header"></div>
    <div class="layui-card-body layui-row layui-col-space10">
        <div class="layui-form-item layui-inline">
            <label class="layui-form-label">目录</label>
            <div class="layui-input-inline">
                <select name="modules" lay-verify="required" lay-search="" id="dir" style="height: 30px;width: 200px;border: #d4d1d1 1px solid;" >
                    <option value="">请选择目录</option>

                </select>

            </div>
            <div class="layui-form-mid layui-word-aux" id="tag"><i class="layui-icon">&#xe702;</i>*生成二维码时"区域+二维码前缀"生成一个目录,路径:public/static/qrcode下面的文件夹</div>
        </div>
    </div>
</div>
<div class="layui-form-item layui-row layui-col-xs12">
    <div class="layui-input-block">
        <button class="layui-btn layui-btn-sm"  onclick="submit();">一键导出EXCEL</button>
        <!--<button class="layui-btn layui-btn-sm"  onclick="downloadQrcode();">下载二维码</button>-->

    </div>
    <div class="layui-form-mid layui-word-aux" style="    margin-left: 103px;" ><i class="layui-icon">&#xe702;</i>*1.一键导出EXCEL:将设备编号和二维码内容以excel形式导出;2.下载二维码:将二维码图片压缩下载到本地</div>

</div>
<input type="hidden" id="qrcode_no" name="qrcode_no" value="{$qrcode_no|default=''}"/>
{/block}

{block name="script"}
<script>

    function submit() {
        var dir = $("#dir").val();
        var qrcode_no = $("#qrcode_no").val();
        window.location.href="{:url('admin/Equipment/export')}?qrcode_no="+qrcode_no
    }
    function downloadQrcode() {
        var dir = $("#dir").val();
        window.location.href="{:url('admin/Qrcode/downloadQrcode')}?dir="+dir
    }




</script>
{/block}
